<?php if (Zend_Auth::getInstance()->hasIdentity()): ?>
    <?php if (Zend_Auth::getInstance()->getIdentity()->userRole == "admin"): ?>
        <a class="button" href="/admin/create-evento">Nuovo Evento</a>
        <a class="confirm button" href="/admin/delete-evento/ident/<?php echo $this->ident; ?>">Cancella Evento</a>
        <a class="button" href="/admin/update-evento/ident/<?php echo $this->ident; ?>">Modifica Evento</a>
        <br />
        <br />
    <?php endif; ?>
<?php endif; ?>
<?php $this->headTitle($this->titolo) ?>

<h2><?php echo $this->titolo; ?></h2>

<?php if($this->dataRimandato): ?>
    <h6 class="alert">Evento rimandato al: <?php echo $this->dataRimandato; ?></h6>
<?php endif; ?>


<h4 class="alt"><?php echo $this->intro; ?></h4>
<p></p>
<?php if ($this->isActual): ?>
    <p><a href=<?php echo $this->url(array(
                    'module'        => 'default',
                    'controller'    => 'iscrizione',
                    'action'        => 'index',
                    'ident'         => $this->ident,
                ),
                'index_iscrizione') ?>>
                Iscriviti all'evento
        </a></p>
<?php endif; ?>
<h6>Categorie:</h6>
<?php foreach ($this->cats as $cat): ?>
    [
    <?php if (Zend_Auth::getInstance()->hasIdentity()): ?>
        <?php if (Zend_Auth::getInstance()->getIdentity()->userRole == "admin"): ?>
    <a href="/admin/delete-category-evento/evId/<?php echo $this->id; ?>/catId/<?php echo $cat->catId; ?>" title="Elimina categoria" class="confirm sorvola"><img src="/img/cestino.jpg" alt="elimina" height="12" width="10"/></a>
        <?php endif; ?>
    <?php endif; ?>
    <?php echo $cat->catNome; ?> ] 
<?php endforeach; ?>
    <?php if (Zend_Auth::getInstance()->hasIdentity()): ?>
        <?php if (Zend_Auth::getInstance()->getIdentity()->userRole == "admin"): ?>
    <a class="sorvola" title="Aggiungi una categoria" href="/admin/update-evento/ident/<?php echo $this->ident; ?>"><img src="/img/plus.png" height="15" width="15"/></a>
        <?php endif; ?>
    <?php endif; ?>

<h6>Data inizio:</h6> <?php echo $this->dataInizio; ?>
<h6>Data fine:</h6> <?php echo $this->dataFine; ?>
<h6>Termine Ultimo iscrizione:</h6> <?php echo $this->dataTermine; ?>

<h6>Logistica:</h6> <?php echo $this->logistica; ?>
<h6>Abbigliamento:</h6> <?php echo $this->abbigliamento; ?>
<h6>Difficoltà:</h6> <?php echo $this->difficolta; ?>
<h6>Costo:</h6> <?php echo $this->costo; ?>
<h6>Info:</h6> <?php echo $this->info; ?>
<h6>Guida:</h6> <a href=<?php echo $this->url(array(
                'controller' => 'guida',
                'action' => 'index',
                'ident' => $this->guidaIdent,
            ),
            'index_guida') ?>>
                    <?php echo $this->guida; ?>
                </a>
<p></p>
<p><?php echo $this->corpo; ?></p>


<?php echo $this->embedVideo($this->videoId); ?>

